<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>

selection_test(
  '<div contenteditable dir="rtl">|abc\u05D0def</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">|abc\u05D0def</div>',
  '35-0 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">a|bc\u05D0def</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">|abc\u05D0def</div>',
  '35-1 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">ab|c\u05D0def</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">a|bc\u05D0def</div>',
  '35-2 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc|\u05D0def</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">ab|c\u05D0def</div>',
  '35-3 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc\u05D0|def</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc|\u05D0def</div>',
  '35-4 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc\u05D0d|ef</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc\u05D0|def</div>',
  '35-5 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc\u05D0de|f</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc\u05D0d|ef</div>',
  '35-6 rtl right character');

selection_test(
  '<div contenteditable dir="rtl">abc\u05D0def|</div>',
  selection => selection.modify('move', 'right', 'character'),
  '<div contenteditable dir="rtl">abc\u05D0de|f</div>',
  '35-7 rtl right character');
</script>
